package com.maistars.spider.repository.dao.mybatis;

import com.maistars.spider.common.exception.TopicSpiderException;
import com.maistars.spider.repository.dao.SystemDao;
import com.maistars.spider.repository.mapper.SystemMenuMapper;
import com.maistars.spider.repository.model.SystemMenuPO;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author dhr
 * @date 2021/11/27 下午1:20
 */
@Service
public class MybatisSystemDao implements SystemDao {

    @Resource
    private SystemMenuMapper systemMenuMapper;

    @Override
    public List<SystemMenuPO> getSystemMenus(Integer status) throws TopicSpiderException {
        SystemMenuPO systemMenuPO = new SystemMenuPO();
        systemMenuPO.setStatus(1);
        return systemMenuMapper.queryByCondition(systemMenuPO);
    }
}
